﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{

    [Serializable]
   public class CoverageSetup:ICloneable
    {


        public CoverageSetup()
        {

            this._arealTypes = new Dictionary<MAPArealType, bool>();

            this._scTypes = new Dictionary<MAPSCType, bool>();

            this._observationTypes = new Dictionary<MAPObservationType, bool>();
 
        }





        double _defaultElevation=0;

        public double DefaultElevation
        {
            get { return _defaultElevation; }
            set { _defaultElevation = value; }
        }

        bool _isUseForModelBoundary=false;

        public bool IsUseForModelBoundary
        {
            get { return _isUseForModelBoundary; }
            set { _isUseForModelBoundary = value; }
        }


        int _layerStart=1;

        public int LayerStart
        {
            get { return _layerStart; }
            set { _layerStart = value; }
        }


        int _layerEnd=1;

        public int LayerEnd
        {
            get { return _layerEnd; }
            set { _layerEnd = value; }


        }



        Dictionary<MAPSCType, bool> _scTypes;

        public Dictionary<MAPSCType, bool> ScTypes
        {
            get { return _scTypes; }
           
        }



        Dictionary<MAPArealType, bool> _arealTypes;

        public Dictionary<MAPArealType, bool> ArealTypes
        {
            get { return _arealTypes; }
           
        }



        Dictionary<MAPObservationType, bool> _observationTypes;

        public Dictionary<MAPObservationType, bool> ObservationTypes
        {
            get { return _observationTypes; }
          
        }






        public object Clone()
        {
            CoverageSetup cs =(CoverageSetup) this.MemberwiseClone();

            cs._arealTypes = new Dictionary<MAPArealType, bool>();
            foreach (KeyValuePair<MAPArealType,bool> item in this._arealTypes)
	        {
                        cs._arealTypes.Add (item.Key,item.Value);
		 
	        }


            cs._observationTypes = new Dictionary<MAPObservationType, bool>();

            foreach (KeyValuePair<MAPObservationType,bool> item in this._observationTypes)
            {
                cs._observationTypes.Add(item.Key,item.Value);
                
            }


            cs._scTypes = new Dictionary<MAPSCType, bool>();

            foreach (KeyValuePair<MAPSCType,bool> item in this._scTypes)
            {
                cs._scTypes.Add(item.Key,item.Value);
                
            }



            return cs;


          
        }
    }
}
